Apple II
Technical Notes
_____________________________________________________________________________
                                                  Developer Technical Support


Apple IIGS
#5:    Window and Menu Titles

Revised by:    Matt Deatherage                                  November 1988
Written by:    Dan Oliver                                        October 1986

This Technical Note discusses spacing for both window and menu titles.
_____________________________________________________________________________

Strings used for window titles should always have a space as the first and 
last characters.  This spacing is especially important for windows that use a 
lined window title bar since, without the beginning and ending space, the line 
pattern in the title bar runs against the title.  Since there will be window 
editor desk accessories which allow the user to change the title bar pattern 
without the application knowing, you should pad your window titles with spaces 
even if you are using black window title bars.

The Window Manager does not force spaces on either side of titles to optimize 
the window frame drawing speed; it is much faster to let the text punch a hole 
in the title bar pattern than to compute the rectangle, fill it, and draw the 
text.

To provide the user with a consistent visual interface, you should also pad 
your menu titles with spaces.  If you use either one or two spaces (the Apple 
IIGS Finder has used two) before and after each menu title, your menu titles 
will be consistent and balanced (two spaces work well in 640 mode where one 
space usually suffices for 320 mode).  Although it is true that a menu bar 
will look about the same if the first menu title has two spaces before it and 
no space following it and all the other menu titles have four spaces before 
them, when the user pulls down the menu, the Menu Manager's highlighting will 
clearly (and embarrassingly) show the spaces in the menu titles.

If you would like to place the Apple menu differently, you must use Menu 
Manager calls since you cannot place spaces around the at sign (@) which the 
Menu Manager uses to represent the Apple logo in a menu title.  The easiest 
way to accomplish this is calling SetMTitleStart to set the starting position 
for the leftmost title (usually the Apple menu) within the current menu bar.  
The Apple IIGS Finder has used a value of 10 ($0A) pixels.
